# 括号匹配检查
def par_checker(symbol_str: str) -> bool:
    from pythonds.basic import Stack

    s = Stack()
    pair_dict = {"(": ")", "[": "]", "{": "}"}

    for v in symbol_str:
        if v in pair_dict.keys():
            s.push(v)
        elif v in pair_dict.values():
            if s.empty():
                return False
            elif v != pair_dict[s.top()]:
                return False
            else:
                s.pop()

    return s.empty()
